package com.yixun.qfbao.apidto;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.springframework.util.CollectionUtils;

import com.yixun.qfbao.apidto.base.CommonResDTO;
import com.yixun.qfbao.model.ModelInfo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author zilong.liu
 * @date 2021-2-23
 *
 * desc:
 *     
 */
@Data
public class PartnerCheckResDto implements Serializable {

	private static final long serialVersionUID = -2375348367543417171L;
	
	@ApiModelProperty("被审核人员ID")
	private long checkUserId;
	
	@ApiModelProperty("部门名称")
	private String deptName;
	
	
	@ApiModelProperty("用户名称")
	private String userName;
	
	@ApiModelProperty("电话号码")
	private String phone;
	
	@ApiModelProperty("注册时间")
	private String regesiterTime;
	
	@ApiModelProperty("审核状态 0待审核 2、审核成功  1审核失败")
	private String checkStatus;
	
	@ApiModelProperty("审核人员姓名")
	private String checkUserName;
	
	@ApiModelProperty("审核时间")
	private String checkTime;
	
	@ApiModelProperty("审核备注")
	private String remark;
	
	@ApiModelProperty("自定义模板信息集合")
	private List<ModelInfoResDto> modelInfoResDtoList;
	
	/**
	 * 添加modelInfoResDto 进当前集合元素中
	 */
	public void addModelInfoResDto(ModelInfo modelInfo) {
		if(CollectionUtils.isEmpty(modelInfoResDtoList)) {
			modelInfoResDtoList = new ArrayList<>();
		}
		if(this.checkUserId == modelInfo.getRelId()) {
			ModelInfoResDto modelInfoResDto = new ModelInfoResDto();
			modelInfoResDto.setName(modelInfo.getModelName());
			modelInfoResDto.setDisplayType(modelInfo.getDisplayType());
			modelInfoResDto.setValue(modelInfo.getModelValue());
			modelInfoResDtoList.add(modelInfoResDto);
		}
	}
}
